package com.example.demo.sqlplan.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * ******************************************************
 *
 * @author liugh9
 * @version 1.0
 * @classname SqlPlanTableDTO
 * @description
 * @date 2022/08/12 17:14
 * <p>
 * ******************************************************
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
//@JsonIgnoreProperties(ignoreUnknown = true)
public class SqlPlanTableDTO {
    @JsonProperty("table_name")
    private String tableName;
    @JsonProperty("access_type")
    private String accessType;
    @JsonProperty("r_loops")
    private Integer realLoops;
    private Integer rows;
    @JsonProperty("r_rows")
    private Integer realRows;
    @JsonProperty("r_total_time_ms")
    private BigDecimal realTotalTimeMs;
    private Integer filtered;
    @JsonProperty("r_filtered")
    private Integer realFiltered;
    @JsonProperty("possible_keys")
    private List<String> possibleKeys;
    private String key;
    @JsonProperty("key_length")
    private String keyLength;
    @JsonProperty("used_key_parts")
    private List<String> usedKeyParts;
    private List<String> ref;
    @JsonProperty("pushed_condition")
    private String pushedCondition;
    @JsonProperty("attached_condition")
    private String attachedCondition;
    private String message;
    @JsonProperty("first_match")
    private String firstMatch;
    private SqlPlanMaterializedDTO materialized;

}
